package com.fjw.service.impl;

import com.fjw.mapper.CvMapper;
import com.fjw.pojo.Cv;
import com.fjw.service.CvService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 简历业务逻辑实现类
 * 负责处理简历的增删改查等核心业务逻辑，与数据库简历表交互
 */
@Service
public class CvServiceImpl implements CvService {

    @Autowired
    private CvMapper cvMapper;

    @Override
    public void add(Cv cv) {
        cvMapper.add(cv);
    }

    @Override
    public Cv findById(Integer id) {
        return cvMapper.findById(id);
    }

    @Override
    public List<Cv> findByAuthor(Integer author) {
        return cvMapper.findByAuthor(author);
    }

    @Override
    public List<Cv> getAll() {
        return cvMapper.getAll();
    }

    @Override
    public void updateById(Cv cv) {
        cvMapper.updataById(cv);
    }
}
